package link.xieyu.service;

import link.xieyu.mapper.AppClickMapper;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @author xieyu
 */
@Slf4j
@Service
@RequiredArgsConstructor
public class AppClickServiceImpl implements AppClickService {
    private final AppClickMapper appClickMapper;
    @Override
    public String doClick(String key) {
        String returnTest = appClickMapper.findOneByEnentKey(key);

        if (returnTest==null) {
            log.error("请及时设置按钮key为:{}的点击返回信息!",key);
            return "服务繁忙,请稍后再试!";
        }
        return returnTest;
    }
}
